from ollama import Message

from application.prompt.prompt_template_service import PromptTemplateService


def append_system_message(content: str = PromptTemplateService.get_string_prompt_with_system_message()) -> list[Message]:
    return [
        Message(
            role='system',
            content=content
        )
    ]


def append_user_message(content: str, messages: list[Message] = None) -> list[Message]:
    if not messages:
        messages = append_system_message()
    messages.append(Message(
        role='user',
        content=content
    ))
    return messages
